package com.dwxt.cdms.dao.yumeng;

import com.dwxt.cdms.applets.dto.IndexReqDTO;
import com.dwxt.cdms.entity.yumeng.SleepData;
import com.dwxt.cdms.view.wristwatch.NewSleepDataView;
import com.dwxt.cdms.view.wristwatch.SleepDataView;
import com.dwxt.cdms.vo.SelectWatchDataVo;
import com.dwxt.cdms.vo.SelectWatchVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface SleepDataMapper extends Mapper<SleepData> {

    int countSleepDataByDevAndTime(SleepData sleepData);

    List<SleepDataView> selectSleepDataByCondition(SelectWatchDataVo selectWatchDataVo);

    int deleteSleepDataByCustomerIds(@Param("customerIds") Integer[] customerIds);

    List<NewSleepDataView> selectSleepDataViewByCondition(SelectWatchDataVo selectWatchDataVo);

    int replaceBindingWatchUser(@Param("customerId") Integer customerId, @Param("deviceIdentity") String deviceIdentity);

    List<Integer> selectCustomerIdsBySleepData(SelectWatchDataVo selectWatchDataVo);

    NewSleepDataView selectSleepDataViewByNewestAndCustomerId(Integer customerId);

    List<NewSleepDataView> selectSleepDataViewByCustomerId(SelectWatchVo selectWatchVo);

    List<SleepData> selectSleepGraph(Integer customerId);

    NewSleepDataView selectByTimeAndCustomerId(@Param("customerId") Integer customerId, @Param("time") String startTime);

    List<NewSleepDataView> selectByPara(IndexReqDTO indexReqDTO);

    List<NewSleepDataView> selectCustomerSleepDataView(String customerId, Integer scope);
}